package gameManager;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.event.KeyEvent;

public abstract class PlayerCharacter extends GameCharacter{
    
    private int myArmor;
    private Dimension myBackgroundSize = new Dimension();
       
    public PlayerCharacter (Point startPosition){
        setInteractablePosition(startPosition);
    }


    
  

    public int getArmorLevel(){
        return myArmor;
    }
    
    public void setArmorLevel(int newArmorLevel){
        myArmor = newArmorLevel;
    }
    
    public void changeArmorLevel(int dArmorLevel){
        myArmor += dArmorLevel;
    }

    public void removeWeapon (String weaponName){
        getMyWeapons().remove(weaponName);
    }

    public void reformWeapon (String weaponName, int dWeaponLevel, int dCoolDownTime){
        for(WeaponObject w : getMyWeapons()){
            if(weaponName.equals(w.getWeaponName())){
                w.changeWeaponLevel(dWeaponLevel);
                w.changeCoolDownTime(dCoolDownTime);
            }           
        }
    }
    
    public void setBackgroundDimension(Dimension backgroundSize) {
        myBackgroundSize = backgroundSize;
    }
    
    public Dimension getBackgroundDimension() {
        return myBackgroundSize;
    }
}
